package shiyan2;

import java.io.*;
import java.util.Scanner;

public class shiyan2_5 {
    public static void main(String[] args){
        String userInput1;
        String userInput2;
        String userInput3;
        Scanner scan = new Scanner(System.in);
        double[] prices = {19.99,9.99,15.99,3.99,4.99};
        int[] units = {12,8,13,29,50};
        String[] descs = {"Java T-shirt",
                "java mug",
                "duke juggling dolls",
                "java pin",
                "java key chain"
        };
        try{
            DataOutputStream output = new DataOutputStream(new FileOutputStream("shiyan2_5.out"));
            DataInputStream input = new DataInputStream(new FileInputStream("shiyan2_5.out"));
            BufferedReader read = new BufferedReader(new InputStreamReader(input));
            for(int iter = 0;iter < descs.length;iter++){
                output.writeDouble(prices[iter]);
                output.writeChar('\t');
                output.writeInt(units[iter]);
                output.writeChar('\t');
                output.writeChars(descs[iter]);
                output.writeChar('\n');
            }
            output.close();
            double pri;
            int unint;
            String str;
            while (true){
                pri = input.readDouble();
                input.readChar();
                unint = input.readInt();
                input.readChar();
                str = input.readLine();
                System.out.println(pri+"\t"+unint+"\t"+str+"\n");
            }
        } catch (IOException e) {
        }

    }
}
